-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Add password visibility toggle and strength checker to teacher invitation registration form #2372
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @besque)
portal/templates/portal/teach/invited.html
line 23 at r1 (raw file):
</div> <form class="d-flex flex-column" method="post" id="teacher-register-form" autocomplete="off">
I'm not 100% sure how this might have broken the test (maybe it's the prefix instead) but have a look at this test: https://github.com/ocadotechnology/codeforlife-portal/blob/master/portal/tests/test_invite_teacher.py#L26
It fails on line 74 meaning that the success message isn't showing. If you look at lines 63-68, the test inputs the test password in the teacher_password
and teacher_confirm_password
fields and my bet is that the names of these fields have changed, causing the form not to submit successfully in the test.
Let me know if that's correct
Ah, I suppose the tests are failing because of the prefix, the test would be expecting the field name without the prefix. Hope this fixes it, really sorry 😅 Please check and let me know, Thank you! |
@besque It looks like you're getting a different error now - seems like |
My apologies, I'm looking into this |
No worries! The test logs should hopefully have clear error messages but if you have any questions feel free to ask 😄 |
Ahh, I was trying to acess the field's name from the field object, I've updated the code to acess the field name directly from the dictionary key instead. This should do the job |
hey @faucomte97, You're right, I've updated it so that even the prefix is included so it shouldn't give that error anymore. Sorry for the delay 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @besque)
This pr fixes issue #2304
Description
Fixed missing JavaScript functionality in teacher invitation registration form. Added prefix to match main registration form's field IDs, which restored:
Root cause:
prefix = 'teacher_signup'
to InvitedTeacherForm class to match the main registration form's ID patternBug
When teachers were invited to join a school, the password registration form was missing the reveal password icon and strength checker that exists in the main registration form.
Fixed
How Has This Been Tested?
Checklist:
This change is